'use strict'
let mongoose = require('mongoose')
let Schema = mongoose.Schema
let ObjectId = Schema.ObjectId

let TradeSchema = new Schema({
    _id: Number,
    pId: Number,
    pName: String,
    itemId: Number,
    itemNum: Number,
    sellTime: Number, //出售时间
    sellGold: Number,
    sellType: Number,
});

/**/
mongoose.model('Trade', TradeSchema);

TradeSchema.index({
    pId: 1,
    sellTime: 1,
    sellGold: 1,
})